{extend name="ashippingterminal/Public/base" /}
{block name="container"}
<div class="page-heade clearfix">
    <h2 class="clearfix text-center">
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333" href="{:url('ashippingterminal/query')}">所有导购销售目标查询</a>
        <a class="col-md-3 title_color H_right H_active" style="font-size: 16px;" href="{:url('ashippingterminal/index')}">所有导购销售目标管理</a>
        <a class="col-md-3 title_color H_right" style="font-size: 16px;color:#333;"  href="{:url('ashippingterminal/statistics')}">所有导购销售目标统计</a>
        <a class="col-md-3 title_color" style="font-size: 16px;color:#333;"  href="{:url('ashippingterminal/notarget')}">所有未设置目标的导购名单</a>
    </h2>
</div>
<table class="table table-bordered">
    <tr>
        <td><a href="{:url('ashippingterminal/import')}" class="btn btn-sm btn-primary">导购销售目标导入</a></td>
    </tr>
</table>
<form action="" class="form-inline" id="form1" method="post">
    <table class="table table-bordered bud_hei">
        <tr>
            <td class="text-right">编号：</td>
            <td><input type="text" name="a.no"  class="form-control" value="<?php if(isset($where['a_no'])) echo $where['a_no']; ?>"></td>
            <td class="text-right">状态：</td>
            <td>
                <select name="a.state" id="state" class="form-control select">
                    <option value="">请选择</option>
                    <option value="草稿">草稿</option>
                    <option value="已更改">已更改</option>
                </select>
                <script>
                    $('#state').val("<?php if(isset($where['a_state'])) echo $where['a_state']; ?>");
                </script>
            </td>
            <td class="text-right">财年：</td>
            <td><input type="text" name="a.year" class="form-control" value="<?php if(isset($where['a_year'])) echo $where['a_year']; ?>"></td>

        </tr>
        <tr>
            <td class="text-right">主题：</td>
            <td><input type="text" class="form-control" name="a.theme" value="<?php if(isset($where['a_theme'])) echo $where['a_theme']; ?>"></td>
            <td class="text-right">申请人：</td>
            <td colspan="3"><input type="text" class="form-control" name="b.em_name" value="<?php if(isset($where['b_em_name'])) echo $where['b_em_name']; ?>"></td>
        </tr>
        <tr>
            <td colspan="6" class="text-center">
                <button class="btn-sm btn-info btn" type="submit">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button>
            </td>
        </tr>
    </table>
<table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
    <tr class="info">
        <td>N0.</td>
        <td>编号</td>
        <td>主题</td>
        <td>财年</td>
        <td>状态</td>
        <td>申请人</td>
        <td>申请时间</td>
        <td>操作</td>
    </tr>
    {notempty name="data"}
    {volist name="data" id="list"}
    <tr>
        <td>{$i}</td>
        <td><a href="{:url('ashippingterminal/info')}?id={$list.id}">{$list.no}</a>{if condition="$list['state'] == '已更改'"}<span class="glyphicon glyphicon-ok duigou" title="已生效" aria-hidden="true"></span>{/if}</td>
        <td>{$list.theme}</td>
        <td>{$list.year}</td>
        <td>{$list.state}</td>
        <td>{$list.user}</td>
        <td>{$list.applyDate}</td>
        <td><a href="{:url('ashippingterminal/edit')}?id={$list.id}">{$list.id}异动</a></td>
    </tr>
    {/volist}
</table>
    <h5 class="text-center" style="font-size: 13px;font-weight: 500">
        总共有{$count}条记录，第{$page}/{$maxpage}页,当前页<input id="page" name="pages" type="text" style="width: 40px" value="1"/>
        <button id="gopage">Go</button>&nbsp;&nbsp;<button
            id="fistpage" onclick="$('#form1').find('input').val('');">首页</button>&nbsp;&nbsp;
        每页显示
        <select id="pagesize" name="limts">
            <option value='10' selected>10条</option>
            <option value='15'>15条</option>
            <option value='20'>20条</option>
        </select>
        <script>
            $('#pagesize').val("{$limit}");
        </script>
    </h5>
    {else /}
</table>
    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3>
    {/notempty}
</form>
<script>

    $(document).ready(function () {
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })

</script>

{/block}
